<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja" id="main">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>Html5Audio Class</title>
	<link rel="stylesheet" href="../inc/css/style.min.css" />
	<script type="text/javascript" src="../inc/js/lib/jquery-1.11.1.min.js"></script>
	<script type="text/javascript" src="../inc/js/common.js"></script>
</head>
<body>

	<div class="main">

		<h1 class="main__title--h1 main__title--h1--v07">Html5Audio Class</h1>
		<ul class="breadcrumb">
			<li>JSライブラリ</li>
			<li>&gt;</li>
			<li>Html5Audio Class</li>
		</ul>
		<p>The static class that handles HTML5 Audio.</p>
		<div class="main__section">
			<h2 class="main__title--h2">Constructor</h2>
<pre class="main__pre--code">
Html5Audio ()
</pre>
		</div><!-- /main__section -->


		<div class="main__section">
			<h2 class="main__title--h2">Item Index</h2>
			<b>Methods</b>
			<ul class="main__ul--inline">
				<li><a href="#m01">addLoadListener</a> <span>static</span></li>
				<li><a href="#m02">clear</a> <span>static</span></li>
				<li><a href="#m03">fadeIn</a> <span>static</span></li>
				<li><a href="#m04">fadeOut</a> <span>static</span></li>
				<li><a href="#m05">initialize</a> <span>static</span></li>
				<li><a href="#m06">isError</a> <span>static</span></li>
				<li><a href="#m07">isPlaying</a> <span>static</span></li>
				<li><a href="#m08">isReady</a> <span>static</span></li>
				<li><a href="#m09">play</a> <span>static</span></li>
				<li><a href="#m10">seek</a> <span>static</span></li>
				<li><a href="#m11">setup</a> <span>static</span></li>
				<li><a href="#m12">stop</a> <span>static</span></li>
			</ul>

			<b>Properties</b>
			<ul class="main__ul--inline">
				<li><a href="#p01">url</a></li>
				<li><a href="#p02">volume</a></li>
			</ul>
		</div><!-- /main__section -->


		<div class="main__section">
			<h2 class="main__title--h2">Methods</h2>

			<div id="m01" class="main__subsection">
<pre class="main__pre--code">
addLoadListener ( listner ) <span class="pre__static">[static]</span>
</pre>
				<p class="mb10px">Add a callback function that will be called when the audio data is loaded.</p>
				<div class="params">
					<h4>Parameters:</h4>
					<ul class="params-list">
						<li class="param">
							<code class="param-name">listner</code>
							<span class="type">Function</span>
							<div class="param-description">
								<p>The callback function</p>
							</div>
						</li>
					</ul>
				</div>
			</div><!-- /div -->

			<div id="m02" class="main__subsection">
<pre class="main__pre--code">
clear () <span class="pre__static">[static]</span>
</pre>
				<p class="mb10px">Clears the audio data.</p>
			</div><!-- /div -->

			<div id="m03" class="main__subsection">
<pre class="main__pre--code">
fadeIn ( duration ) <span class="pre__static">[static]</span>
</pre>
				<p class="mb10px">Performs the audio fade-in.</p>
				<div class="params">
					<h4>Parameters:</h4>
					<ul class="params-list">
						<li class="param">
							<code class="param-name">duration </code>
							<span class="type">Number</span>
							<div class="param-description">
								<p>Fade-in time in seconds</p>
							</div>
						</li>
					</ul>
				</div>
			</div><!-- /div -->

			<div id="m04" class="main__subsection">
<pre class="main__pre--code">
fadeOut ( duration ) <span class="pre__static">[static]</span>
</pre>
				<p class="mb10px">Performs the audio fade-out.</p>
				<div class="params">
					<h4>Parameters:</h4>
					<ul class="params-list">
						<li class="param">
							<code class="param-name">duration </code>
							<span class="type">Number</span>
							<div class="param-description">
								<p>Fade-out time in seconds</p>
							</div>
						</li>
					</ul>
				</div>
			</div><!-- /div -->

			<div id="m05" class="main__subsection">
<pre class="main__pre--code">
initialize () <span class="pre__type">Boolean</span> <span class="pre__static">[static]</span>
</pre>
				<p class="mb10px">Initializes the audio system.</p>
				<div class="params">
					<h4>Returns:</h4>
					<p><span class="pre__type">Boolean:</span> <br />
					True if the audio system is available</p>
				</div>
			</div><!-- /div -->

			<div id="m06" class="main__subsection">
<pre class="main__pre--code">
isError () <span class="pre__type">Boolean</span> <span class="pre__static">[static]</span>
</pre>
				<p class="mb10px">Checks whether a loading error has occurred.</p>
				<div class="params">
					<h4>Returns:</h4>
					<p><span class="pre__type">Boolean:</span> <br />
					True if a loading error has occurred</p>
				</div>
			</div><!-- /div -->

			<div id="m07" class="main__subsection">
<pre class="main__pre--code">
isPlaying () <span class="pre__type">Boolean</span> <span class="pre__static">[static]</span>
</pre>
				<p class="mb10px">Checks whether the audio is playing.</p>
				<div class="params">
					<h4>Returns:</h4>
					<p><span class="pre__type">Boolean:</span> <br />
					True if the audio is playing</p>
				</div>
			</div><!-- /div -->

			<div id="m08" class="main__subsection">
<pre class="main__pre--code">
isReady () <span class="pre__type">Boolean</span> <span class="pre__static">[static]</span>
</pre>
				<p class="mb10px">Checks whether the audio data is ready to play.</p>
				<div class="params">
					<h4>Returns:</h4>
					<p><span class="pre__type">Boolean:</span> <br />
					True if the audio data is ready to play</p>
				</div>
			</div><!-- /div -->

			<div id="m09" class="main__subsection">
<pre class="main__pre--code">
play ( loop , offset ) <span class="pre__static">[static]</span>
</pre>
				<p class="mb10px">Plays the audio.</p>
				<div class="params">
					<h4>Parameters:</h4>
					<ul class="params-list">
						<li class="param">
							<code class="param-name">loop </code>
							<span class="type">Boolean</span>
							<div class="param-description">
								<p>Whether the audio data play in a loop</p>
							</div>
						</li>
						<li class="param">
							<code class="param-name">offset </code>
							<span class="type">Number</span>
							<div class="param-description">
								<p>The start position to play in seconds</p>
							</div>
						</li>
					</ul>
				</div>
			</div><!-- /div -->

			<div id="m10" class="main__subsection">
<pre class="main__pre--code">
seek () <span class="pre__static">[static]</span>
</pre>
				<p class="mb10px">Gets the seek position of the audio.</p>
			</div><!-- /div -->

			<div id="m11" class="main__subsection">
<pre class="main__pre--code">
setup ( url ) <span class="pre__static">[static]</span>
</pre>
				<p class="mb10px">Sets up the Html5 Audio.</p>
				<div class="params">
					<h4>Parameters:</h4>
					<ul class="params-list">
						<li class="param">
							<code class="param-name">url </code>
							<span class="type">String</span>
							<div class="param-description">
								<p>The url of the audio file</p>
							</div>
						</li>
					</ul>
				</div>
			</div><!-- /div -->

			<div id="m12" class="main__subsection">
<pre class="main__pre--code">
stop () <span class="pre__static">[static]</span>
</pre>
				<p class="mb10px">Stops the audio.</p>
			</div><!-- /div -->

		</div><!-- /main__section -->


		<div class="main__section">
			<h2 class="main__title--h2">Properties</h2>
			<div id="p01" class="main__subsection">
<pre class="main__pre--code">
url <span class="pre__type">String</span>
</pre>
				<p class="mb10px">[read-only] The url of the audio file.</p>
			</div><!-- /div -->

			<div id="p02" class="main__subsection">
<pre class="main__pre--code">
volume <span class="pre__type">Number</span>
</pre>
				<p class="mb10px">The volume of the audio.</p>
			</div><!-- /div -->

		</div><!-- /main__section -->


	</div><!-- /main -->

</body>
</html>